package lsysteem;

import java.util.Vector;

public class LSModel
{
	Vector<IView> _views = new Vector();
	IModelData _modelData;
	
	public void registerView(IView v)
	{
		_views.add(v);
	}
	
	public void removeView(IView v)
	{
		_views.remove(v);
	}
	
	public void updateViews()
	{
		for(IView v:_views)
		{
			v.updateView(_modelData);
		}
	}
	
	public IModelData getModelData()
	{
		return _modelData;
	}
	
	public void setModelData(IModelData md)
	{
		_modelData = md;
	}
}
